<?php

namespace common\models\linkedcare;

use Yii;

/**
 * This is the model class for table "{{%fy_linkedcare_tags}}".
 *
 * @property int $id
 * @property string|null $name
 * @property int|null $tag_id
 * @property string|null $type
 * @property int|null $is_default
 * @property int|null $is_hidden
 * @property string|null $abbreviation
 * @property int|null $office_id
 * @property int $status 状态【-1删除、0禁用、1启用】
 * @property string $created_at 创建时间
 * @property string|null $updated_at 更新时间
 */
class LinkedcareTags extends \common\models\base\BaseModel
{
    const STATUS_DELETE = -1;// 删除
    const STATUS_INVALID = 0;// 失效
    const STATUS_ENABLE = 1;// 正常

    public static $statuss = [
        self::STATUS_DELETE => '删除',
        self::STATUS_INVALID => '禁用',
        self::STATUS_ENABLE => '正常',
    ];

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%fy_linkedcare_tags}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['tag_id', 'is_default', 'is_hidden', 'office_id', 'status'], 'integer'],
            [['created_at', 'updated_at'], 'safe'],
            [['name', 'type'], 'string', 'max' => 100],
            [['abbreviation'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'tag_id' => 'Tag ID',
            'type' => 'Type',
            'is_default' => 'Is Default',
            'is_hidden' => 'Is Hidden',
            'abbreviation' => 'Abbreviation',
            'office_id' => 'Office ID',
            'status' => '状态【-1删除、0禁用、1启用】',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
